<template>
  <div id="app">
    <v-aside v-if="showHead"></v-aside>
    <v-head v-if="showHead"></v-head>
    <div class="container-fluid">
      <div class="row">
        <router-view></router-view>
        <h3></h3>
      </div>
    </div>
  </div>
</template>

<script>
import header from "./components/header/header";
import aside from "./components/header/aside";

import { Toast } from "mint-ui";
export default {
  data() {
    return {
      students: {},
      infos: {},
      studentHistorys: {},
      showHead: true
    };
  },
  components: {
    "v-head": header,
    "v-aside": aside
  },
  methods: {
    changeRouter() {
      if (this.$route.path == "/login") {
        this.showHead = false;
      } else if (this.$route.path == "/register") {
        this.showHead = false;
      } else {
        this.showHead = true;
      }
    }
  },
  created() {
    this.changeRouter();
  },
  watch: {
    $route: "changeRouter"
  }
};
</script>
<style>
.login {
  width: 500px;
  margin: 0 auto;
}
</style>
